package com.mtz.utils;
import com.mtz.VO.QuesAnsVO;
import com.mtz.dateobject.Answer;
import com.mtz.dateobject.Question;

/**
 * @author 煜赜
 * @date 2018/12/3 0003 上午 11:13
 */
public class MergeQuesAnsUtil {

    public static QuesAnsVO merge(Question question, Answer answer) {
        QuesAnsVO quesAnsVO = new QuesAnsVO();

        quesAnsVO.setId(question.getId());
        quesAnsVO.setKnowledgeType(question.getKnowledgeType());
        quesAnsVO.setQuestion(question.getQuestion());
        quesAnsVO.setKeyword(question.getKeyword());
        quesAnsVO.setAnswer(answer.getAnswer());
        quesAnsVO.setAuthor(answer.getAuthor());
        quesAnsVO.setAngle(answer.getAngle());
        quesAnsVO.setIsDeleted(question.getIsDeleted());
        quesAnsVO.setCreateTime(answer.getCreateTime());
        quesAnsVO.setUpdateTime(answer.getUpdateTime());

        return quesAnsVO;
    }

}
